//
//  DataController.h
//  SHWT
//
//  Created by Rui on 14/10/23.
//  Copyright (c) 2014年 xingheng. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Helpers.h"
#import <AFNetworking.h>

@interface DataController : NSObject

/**
 *  用户登陆
 *
 *  @param telNum    手机号/用户名
 *  @param password  登录密码
 *  @param loginType 登录类型
 *  @param imei      设备号
 *  @param success   成功回调
 */
+ (void)userLogin:(NSString *)telNum
         password:(NSString *)password
        loginType:(NSString *)loginType
             imei:(NSString *)imei
        withBlock:(void(^)(NSDictionary *result))success;

/**
 *  重置密码
 *
 *  @param loginName        登录账号
 *  @param telNum           手机号/用户名
 *  @param verificationCode 验证码
 *  @param newPassword      新密码
 *  @param userType         用户类型
 *  @param success          成功回调
 */
+ (void)resetPassword:(NSString *)loginName
               telNum:(NSString *)telNum
     verificationCode:(NSString *)verificationCode
          newPassword:(NSString *)newPassword
             userType:(NSString *)userType
            withBlock:(void(^)(NSDictionary *result))success;

/**
 *  修改密码
 *
 *  @param loginName   登录账号
 *  @param telNum      手机号
 *  @param oldPassword 旧密码
 *  @param newPassword 新密码
 *  @param imei        设备号
 *  @param success     成功回调
 */
+ (void)modifyPassword:(NSString *)loginName
                telNum:(NSString *)telNum
           oldPassword:(NSString *)oldPassword
           newPassword:(NSString *)newPassword
                  imei:(NSString *)imei
             withBlock:(void(^)(NSDictionary *result))success;


/**
 *  用户注册
 *
 *  @param loginName        登录名
 *  @param password         登录密码
 *  @param loginType        登录类型
 *  @param userName         联系人
 *  @param telNum           手机号码
 *  @param verificationCode 验证码
 *  @param success          成功回调
 */
+ (void)userRegist:(NSString *)loginName
          password:(NSString *)password
         loginType:(NSString *)loginType
          userName:(NSString *)userName
            telNum:(NSString *)telNum
  verificationCode:(NSString *)verificationCode
         withBlock:(void(^)(NSDictionary *result))success;

/**
 *  文件上传
 *
 *  @param userId  用户id
 *  @param imei    设备号
 *  @param success 成功回调
 */
+ (void)singleFileUpload :(NSNumber *)userId
                     imei:(NSString *)imei
                withBlock:(void(^)(NSDictionary *result))success;

/**
 *  获取推送货源列表信息
 *
 *  @param orgId   orgId description
 *  @param userId  userId description
 *  @param lastId  lastId description
 *  @param imei    imei description
 *  @param success 成功回调
 */
+ (void)textRequest:(NSNumber *)orgId
             userId:(NSNumber *)userId
             lastId:(NSNumber *)lastId
               imei:(NSString *)imei
          withBlock:(void(^)(NSDictionary *result))success;


/**
 *  获取共享货源列表信息
 *
 *  @param orgId   orgId description
 *  @param userId  userId description
 *  @param lastId  lastId description
 *  @param imei    imei description
 *  @param success 成功回调
 */
+ (void)getShareGoods:(NSNumber *)orgId
               userId:(NSNumber *)userId
               lastId:(NSNumber *)lastId
                 imei:(NSString *)imei
            withBlock:(void(^)(NSDictionary *result))success;


/**
 *  获取当前货单列表信息
 *
 *  @param orgId    orgId
 *  @param userId   userId
 *  @param lastId   lastId
 *  @param userType userType
 *  @param imei     imei
 *  @param success  成功回调
 */
+ (void)getCurOrder:(NSNumber *)orgId
             userId:(NSNumber *)userId
             lastId:(NSNumber *)lastId
           userType:(NSString *)userType
               imei:(NSString *)imei
          withBlock:(void(^)(NSDictionary *result))success;


/**
 *  获取历史货单列表信息
 *
 *  @param orgId    orgId
 *  @param userId   userId
 *  @param lastId   lastId
 *  @param userType userType
 *  @param imei     imei
 *  @param success  成功回调
 */
+ (void)getHisOrder:(NSNumber *)orgId
             userId:(NSNumber *)userId
             lastId:(NSNumber *)lastId
           userType:(NSString *)userType
               imei:(NSString *)imei
          withBlock:(void(^)(NSDictionary *result))success;

/**
 *  获取货单详细信息
 *
 *  @param orgId    orgId
 *  @param userId   userId
 *  @param userType userType
 *  @param imei     imei
 *  @param success  成功回调
 */
+ (void)getOrderDetail:(NSNumber *)orderId
                userId:(NSNumber *)userId
              userType:(NSString *)userType
                  imei:(NSString *)imei
             withBlock:(void(^)(NSDictionary *result))success;


/**
 *  获取物流商公司所有车牌号信息
 *
 *  @param orgId    orgId
 *  @param userId   userId
 *  @param imei     imei
 *  @param success  成功回调
 */
+ (void)getLicensePlate:(NSNumber *)orgId
                 userId:(NSNumber *)userId
                   imei:(NSString *)imei
              withBlock:(void(^)(NSDictionary *result))success;

/**
 *  选择车辆页面选择完成
 *
 *  @param goodsId 货物id
 *  @param orgId   物流商id
 *  @param orderId 订单id
 *  @param userId  用户id
 *  @param truckId 车辆id
 *  @param type    操作类型
 *  @param note    备注
 *  @param imei    设备号
 *  @param success 成功返回
 */
+ (void)changeOrderStatus:(NSNumber *)goodsId
                    orgId:(NSNumber *)orgId
                  orderId:(NSNumber *)orderId
                   userId:(NSNumber *)userId
                  truckId:(NSString *)truckId
                     type:(NSString *)type
                     note:(NSString *)note
                     imei:(NSString *)imei
                withBlock:(void(^)(NSDictionary *result))success;

/**
 *  获取货车信息
 *
 *  @param truckId      车辆id
 *  @param userId       用户id
 *  @param licensePlate 车辆id
 *  @param imei         设备号
 *  @param success      成功回调
 */
+ (void)getTruckDetail:(NSNumber *)truckId
                userId:(NSNumber *)userId
          licensePlate:(NSString *)licensePlate
                  imei:(NSString *)imei
             withBlock:(void(^)(NSDictionary *result))success;




@end